package com.ilovepostcard;
import android.app.Activity;
import android.app.ProgressDialog;
import android.os.AsyncTask;

public class DialogAsyncTask extends AsyncTask<Object, Object, Object>
{
	
	Activity 	activity;
	ProgressDialog processDlg;
	public DialogAsyncTask(Activity a)
	{
		activity = a;
		processDlg = new ProgressDialog(a);
        processDlg.setMessage(a.getResources().getString(R.string.loading));
        processDlg.setIndeterminate( true );
        processDlg.setCancelable( false );
	}
	
	@Override
	public void onPreExecute()
	{
		processDlg.show();
	}
	
	public Activity getActivity()
	{
		return activity;
	}

	@Override
	public Object doInBackground(Object... params) {

		
		return null;
	}
	@Override
	public void onPostExecute(Object result)
	{
		if (processDlg != null)
		{
			processDlg.dismiss();
		}

	}
	


}
